<script type="text/javascript">
var successFun=function(res){
if(res.code==200){
	document.location	= res.data.forward;
}else{
	alert('出错了，请重新尝试！');
}
}
$(document).ready(function() { 
	var updateOptions	= {dataType:'json',error:doError,success:doSuccess}
    $('#form').ajaxForm(updateOptions); 
}); 
</script>
<div id="content">
<form id="form" action="{url('Link','SaveEdit')}" method="post">
<h3 class="title">{if $this->data['id']>0}修改{else}添加{/if}友情链接</h3>
<table width="95%" cellspacing="1" cellpadding="2" border="0" class="admin-table">
	<tr>
		<td class="list_text in" width="100">网站名称</td>
		<td class="list_input">
<input name="siteName" id="siteName" type="text" tabindex="1" {if $this->data['link']}value="{$this->data['link']['site_name']}"{/if} /><span etype='error_info' class="error_info"id="siteName_info"></span>
		</td>
	</tr>
	<tr>
		<td class="list_text in">网站地址</td>
		<td class="list_input">
<input name="url" id="url" type="text" tabindex="2" {if $this->data['link']}value="{$this->data['link']['url']}"{/if} /><span etype='error_info' class="error_info"id="url_info"></span>
		</td>
	</tr>
	<tr>
		<td class="list_text in">显示顺序</td>
		<td class="list_input">
<input name="orderby" id="orderby" type="text" tabindex="3" {if $this->data['link']}value="{$this->data['link']['orderby']}"{/if} /><span etype='error_info' class="error_info"id="orderby_info">数字越大排在越前面</span>
		</td>
	</tr>
	<tr>
		<td class="list_text in">首页显示</td>
		<td class="list_input">
<input name="indexShow" id="indexShow" type="checkbox" value="1" {if $this->data['link']['index_show']}checked{/if} tabindex="4" />
		</td>
	</tr>
	<tr>
		<td class="list_text in"></td>
		<td class="list_input">
<input id="btnSave" type="submit" value="保存" />
<input name="id" type="hidden" value="{$this->data['id']}" />
		</td>
	</tr>
</table>
</form>
</div>